/**
 * @author wangxiaowei
 * 组织部发文列表
 */
var sort = null;
var grid = null;
function initzuzhibufawenlist(){
		 Ext.BLANK_IMAGE_URL=Ext.get('basePath').getValue()+"ajaxFramework/ext-2.1/resources/images/default/s.gif";

Ext.menu.RangeMenu.prototype.icons = {
	  gt: './ajaxFramework/ext-2.1/img/greater_then.png', 
	  lt: './ajaxFramework/ext-2.1/img/less_then.png',
	  eq: './ajaxFramework/ext-2.1/img/equals.png'
	};
Ext.grid.filter.StringFilter.prototype.icon = './ajaxFramework/ext-2.1/img/find.png';




var colModel = new Ext.grid.ColumnModel([
			{header:'总收文号',dataIndex:'zongshouwenhao',menuDisabled : true,width: 35},
		{header:'收文日期',dataIndex:'shouwenriqi',menuDisabled : true,width: 35},
		{header:'来文号',dataIndex:'laiwenzihao',width: 75},
		{header:'来文单位',dataIndex:'laiwenjihuan',width: 35},
		{header:'摘要',dataIndex:'zhaiyao',width: 175},
		{header:'操作',dataIndex:'operate',menuDisabled : true}
	]);
	var url = Ext.get('url').getValue();
	sort = new Ext.data.JsonStore({
		url:url,
		fields:['laiwenzihao','laiwenjihuan','operate','state','zongshouwenhao','shouwenriqi','laiwenjihuan','zhaiyao']
	});
	
	
	
	 grid = new Ext.grid.GridPanel({
		title:'行政收文管理',
		cm:colModel,
		renderTo:'topic-grid',
		store:sort,
		loadMask:true,
		autoHeight:true,
		viewConfig:{
			forceFit:true,
			getRowClass:function(record,rowIndex,p,ds){
				if(record.get('state') == '是')
				{
					
					return 'red-row';
				}
				else if(record.get('state') == '中止')
				{
					
					return 'yellow-row';
				}
				else if(record.get('state') == '归档')
				{
					
					return 'blue-row';
				}
			}
		}
	});
	
	sort.load();	
  	
}
	